﻿using mds.DataAccessService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mds.ConfigurationService
{
    public class ConfigurationServiceAdapter
    {
        public static IConfigurationService GetService()
        {
            IConfigurationService IService;
            switch (Config.ConfigDatabaseType)
            {
                case EnumDatabaseType.MySql:
                    IService = MysqlConfigurationServiceProvider.Instance;
                    break;
                case EnumDatabaseType.Oracle:
                    IService = OracleServerConfigurationServiceProvider.Instance;
                    break;
                case EnumDatabaseType.SqlServer:
                    IService = MsSqlServerConfigurationServiceProvider.Instance;
                    break;
                default:
                    IService = MsSqlServerConfigurationServiceProvider.Instance;
                    break;
            }
            return IService;
        }
    }
}
